package com.mistoplus.sedona.main;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.mistoplus.sedona.R;

public class LoadingScreen1 extends Activity {

	private Animation mAniStartAnimation;
	private LinearLayout mLyLoading;
//	private ImageView mImvLoading1;
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	
	    setContentView(R.layout.loading_screen1);
	    
	    mLyLoading = (LinearLayout)findViewById(R.id.ly_loading1);
	    mAniStartAnimation = new AlphaAnimation(0.0f, 1.0f);
	    mAniStartAnimation.setAnimationListener(new AnimationListener() {
			
			@Override
			public void onAnimationStart(Animation animation) {
				
			}
			
			@Override
			public void onAnimationRepeat(Animation animation) {
				
			}
			
			@Override
			public void onAnimationEnd(Animation animation) {
				   
			    Handler handler = new Handler();
			    handler.postDelayed(new Runnable() {
			     
			     public void run() {
			    	Intent intent = new Intent(LoadingScreen1.this, LoadingScreen2.class);
			 	    startActivity(intent);
			 	    overridePendingTransition(R.anim.splash_fade, R.anim.splash_hold);
			 	    finish();
			     }
			    }, 500);
			   }
		});
	    mAniStartAnimation.setDuration(500);
	    mLyLoading.startAnimation(mAniStartAnimation);

	    
	}

}
